#pragma once

#include <vector>
#include <ECS/ECS.h>
#include "../Types.h"
#include "../IntGeometry.h"

class Transform;

class Vehicle : public ECS::Component
{
	mtMETA_DEC;
public:
	Vehicle();

	void onStart();

	void onUpdate();

	// Vehicle's velocity in squares per second
	float velocity;

	void setPath(int length, IntPoint* path);
protected:
	void doMoveByPath();

	std::vector<Vector2> _path;

	Transform* _cachedTransform;
};